home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Updates / PowerPC / chunkyppc / chunkyppc_protos.h.step3 < prev    next >
Text File  |  2000-05-16  |  11KB  |  312 lines

  1. #ifndef CHUNKYPPC_PROTOS_H
  2. #define CHUNKYPPC_PROTOS_H
  3.  
  4. #include <exec/types.h>
  5. #include <graphics/gfx.h>
  6. #include <exec/types.h>
  7. #include <graphics/gfx.h>
  8. #include <intuition/intuition.h>
  9. #include <libraries/asl.h>
  10. #include <cybergraphics/cybergraphics.h>
  11.  
  12.  
  13. #define BIT16 1
  14. #define BIT16_SWAP 2
  15. #define BIT16_ROT 4
  16. #define BIT16_SWAP_ROT 8
  17. #define BIT24 16
  18. #define BIT24_ROT 32
  19. #define BIT32 64
  20. #define BIT32_SWAP 128
  21. #define BIT32_ROT 256
  22. #define BIT32_SWAP_ROT 512
  23. #define BIT32_ROT_REVERSE 1024
  24. #define BIT32_SWAP_ROT_REVERSE 2048
  25. #define BIT8 4096
  26.  
  27. struct Soff
  28. {
  29.  int x;
  30.  int y;
  31. };
  32.  
  33. struct Buffers
  34. {
  35.  UBYTE *address;
  36.  UBYTE *mask;
  37. };
  38.  
  39. struct Mode_Screen
  40. {
  41.     struct Screen *video_screen;
  42.     struct Window *video_window;
  43.     int bpr;
  44.     int wb_int;
  45.     int pip_int;
  46.     int dbuf_int;
  47.     int oldstyle_int;
  48.     char pubscreenname[512];
  49.     int mode;
  50.     int SCREENWIDTH;
  51.     int SCREENHEIGHT;
  52.     int MAXWIDTH;
  53.     int MAXHEIGHT;
  54.     int MINDEPTH;
  55.     int MAXDEPTH;
  56.     int format;
  57.     int video_depth;
  58.     UWORD *emptypointer;
  59.     struct BitMap *video_tmp_bm;
  60.     int video_is_native_mode;
  61.     int video_is_cyber_mode;
  62.     unsigned char *screen;
  63.     int video_oscan_height;
  64.     int bufnum;
  65.     struct RastPort *video_rastport;
  66.     struct BitMap *bitmapa;
  67.     struct BitMap *bitmapb;
  68.     struct BitMap *bitmapc;
  69.     struct BitMap *thebitmap;
  70.     struct RastPort *video_temprp;
  71.     struct ScreenModeRequester *video_smr;
  72.     int ham_int;
  73.     UBYTE *wbcolors;
  74.     UBYTE *transtable;
  75.     unsigned long *WBColorTable;
  76.     unsigned long *ColorTable;
  77.     int pal_changed;
  78.     int pen_obtained;
  79.     unsigned char *screenb;
  80.     unsigned char *screenc;
  81.     int numbuffers;
  82.     int rtgm_int;
  83.     struct ScreenBuffer *Buf1;
  84.     struct ScreenBuffer *Buf2;
  85.     struct ScreenBuffer *Buf3;
  86.     void * (*algo)(struct Mode_Screen *ms,unsigned char *dest,unsigned char *src, int srcformat,void *(*hook68k)(unsigned char *data),unsigned char *data);
  87.     void (*Internal1)(void);
  88.     void (*Internal2)(void);
  89.     int onlyptr;
  90.     int cgxlike;
  91. };
  92.  
  93. struct Mode_Screen *OpenGraphics(char *Title, struct Mode_Screen *ms,int override);
  94. void CloseGraphics(struct Mode_Screen *ms, int shutdownlibs);
  95. void LoadColors(struct Mode_Screen *ms, ULONG *Table);
  96. void DoubleBuffer(struct Mode_Screen *ms);
  97. int ChunkyInit68k(struct Mode_Screen *ms, int srcformat);
  98.  
  99. #ifdef __cplusplus
  100. #define CHUNKYPPC_SPROTOS_CPP
  101. #else
  102. #pragma +
  103. #endif
  104.  
  105. extern "library=ChunkyPPCBase"
  106. {
  107.  void ChunkyNoffFast(struct Library *,UBYTE *, UBYTE *, int, int, int) ;
  108.  void ChunkyNoffFastest(struct Library *,UBYTE *, UBYTE *, int, int, int);
  109.  void ChunkyNoffNormal(struct Library *,UBYTE *, UBYTE *, int, int, int);
  110.  void ChunkyFast(struct Library *,UBYTE *, UBYTE *, int, int, int, int, int);
  111.  void ChunkyFastest(struct Library *,UBYTE *, UBYTE *, int, int, int, int, int);
  112.  void ChunkyNormal(struct Library *,UBYTE *, UBYTE *, int, int, int, int, int);
  113.  void ChunkyFastFull(struct Library *,UBYTE *, UBYTE *, struct Soff *, struct Soff *, int, struct Soff *, int);
  114.  void ChunkyFastestFull(struct Library *,UBYTE *, UBYTE *, struct Soff *, struct Soff *, int, struct Soff *, int);
  115.  void ChunkyNormalFull(struct Library *,UBYTE *, UBYTE *, struct Soff *, struct Soff *, int, struct Soff *, int);
  116.  void c2p_1(struct Library *,UBYTE *, struct BitMap *, int, int);
  117.  void c2p_2(struct Library *,UBYTE *, UBYTE *, UBYTE *, int);
  118.  void c2p_3(struct Library *,void *, void *, int , int , struct Soff * , int , int);
  119.  void c2p_4(struct Library *,UBYTE *,UBYTE *, UBYTE *, struct Soff *,struct Soff *, struct Soff *);
  120.  void ChunkyNoffFastHT(struct Library *,UBYTE *,UBYTE *,int,int,int,int);
  121.  void ChunkyNoffFastestHT(struct Library *,UBYTE *,UBYTE *,int,int,int,int);
  122.  void ChunkyNoffNormalHT(struct Library *,UBYTE *,UBYTE *,int,int,int,int);
  123.  void ChunkyFastHT(struct Library *,UBYTE *,UBYTE *,struct Soff *,int,int,int,int);
  124.  void ChunkyFastestHT(struct Library *,UBYTE *,UBYTE *,struct Soff *,int,int,int,int);
  125.  void ChunkyNormalHT(struct Library *,UBYTE *,UBYTE *,struct Soff *,int,int,int,int);
  126.  void ChunkyFastFullHT(struct Library *,UBYTE *,UBYTE *,struct Soff *,struct Soff *,struct Soff *,struct Soff *,int);
  127.  void ChunkyFastestFullHT(struct Library *,UBYTE *,UBYTE *,struct Soff *,struct Soff *,struct Soff *, struct Soff *, int);
  128.  void ChunkyNormalFullHT(struct Library *,UBYTE *,UBYTE *,struct Soff *,struct Soff *,struct Soff *,struct Soff *, int);
  129.  void ChunkyNoffMask(struct Library *,struct Buffers *,UBYTE *,int,int,int,int);
  130.  void ChunkyMask(struct Library *,struct Buffers *,UBYTE *,struct Soff *,int,int,int,int);
  131.  void ChunkyMaskFull(struct Library *,struct Buffers *,UBYTE *,struct Soff *, struct Soff *,struct Soff *,struct Soff *, int);
  132.  void c2p_HI(struct Library *, UBYTE *, int, UBYTE *, UBYTE *, UBYTE *, UBYTE *, UBYTE *);
  133.  void ham_c2p(struct Library *, unsigned char *, unsigned char *, int, int, int, int, int);
  134.  int ChunkyInit(struct Library *,struct Mode_Screen *ms, int srcformat);
  135. }
  136.  
  137. __inline int ChunkyInit(struct Mode_Screen *ms, int srcformat)
  138. {
  139.  extern struct Library *ChunkyPPCBase;
  140.  return ChunkyInit(ChunkyPPCBase,ms,srcformat);
  141. }
  142.  
  143. __inline void ham_c2p(unsigned char *chunky, unsigned char *planar, int width, int height, int depth, int qual, int ham_width)
  144. {
  145.  extern struct Library *ChunkyPPCBase;
  146.  ham_c2p(ChunkyPPCBase,chunky,planar,width,height,depth,qual,ham_width);
  147. }
  148.  
  149. __inline void c2p_HI(UBYTE *address, int num, UBYTE *bpl0, UBYTE *bpl1, UBYTE *bpl2, UBYTE *bpl3, UBYTE *bpl4)
  150. {
  151.  extern struct Library *ChunkyPPCBase;
  152.  c2p_HI(ChunkyPPCBase,address,num,bpl0,bpl1,bpl2,bpl3,bpl4);
  153. }
  154.  
  155. __inline void ChunkyNoffFast(UBYTE *address, UBYTE *data, int w, int h, int bpr)
  156. {
  157.  extern struct Library *ChunkyPPCBase;
  158.  ChunkyNoffFast(ChunkyPPCBase,address,data,w,h,bpr);
  159. }
  160.  
  161. __inline void ChunkyNoffFastest(UBYTE *address, UBYTE *data, int w, int h, int bpr)
  162. {
  163.  extern struct Library *ChunkyPPCBase;
  164.  ChunkyNoffFastest(ChunkyPPCBase,address,data,w,h,bpr);
  165. }
  166.  
  167. __inline void ChunkyNoffNormal(UBYTE *address, UBYTE *data, int w, int h, int bpr)
  168. {
  169.  extern struct Library *ChunkyPPCBase;
  170.  ChunkyNoffNormal(address,data,w,h,bpr);
  171. }
  172.  
  173. __inline void ChunkyFast(UBYTE *address, UBYTE *data, int x, int y, int w, int h, int bpr)
  174. {
  175.  extern struct Library *ChunkyPPCBase;
  176.  ChunkyFast(address,data,x,y,w,h,bpr);
  177. }
  178.  
  179. __inline void ChunkyFastest(UBYTE *address, UBYTE *data, int x, int y, int w, int h, int bpr)
  180. {
  181.  extern struct Library *ChunkyPPCBase;
  182.  ChunkyFastest(address,data,x,y,w,h,bpr);
  183. }
  184.  
  185. __inline void ChunkyNormal(UBYTE *address, UBYTE *data, int x, int y, int w, int h, int bpr)
  186. {
  187.  extern struct Library *ChunkyPPCBase;
  188.  ChunkyNormal(address,data,x,y,w,h,bpr);
  189. }
  190.  
  191. __inline void ChunkyFastFull(UBYTE *address, UBYTE *data, struct Soff *dest, struct Soff *size, int bpr, struct Soff *soff, int sbpr)
  192. {
  193.  extern struct Library *ChunkyPPCBase;
  194.  ChunkyFastFull(address,data,dest,size,bpr,soff,sbpr);
  195. }
  196.  
  197. __inline void ChunkyFastestFull(UBYTE *address, UBYTE *data, struct Soff *dest, struct Soff *size, int bpr, struct Soff *soff, int sbpr)
  198. {
  199.  extern struct Library *ChunkyPPCBase;
  200.  ChunkyFastestFull(address,data,dest,size,bpr,soff,sbpr);
  201. }
  202.  
  203. __inline void ChunkyNormalFull(UBYTE *address, UBYTE *data, struct Soff *dest, struct Soff *size, int bpr, struct Soff *soff, int sbpr)
  204. {
  205.  extern struct Library *ChunkyPPCBase;
  206.  ChunkyNormalFull(address,data,dest,size,bpr,soff,sbpr);
  207. }
  208.  
  209. __inline void c2p_1(UBYTE *buffer, struct BitMap *bm, int width, int height)
  210. {
  211.  extern struct Library *ChunkyPPCBase;
  212.  c2p_1(ChunkyPPCBase,buffer,bm,width,height);
  213. }
  214.  
  215. __inline void c2p_2(UBYTE *buffer, UBYTE *plane0, UBYTE *helpbfr, int PlaneSize)
  216. {
  217.  extern struct Library *ChunkyPPCBase;
  218.  c2p_2(ChunkyPPCBase,buffer,plane0,helpbfr,PlaneSize);
  219. }
  220.  
  221. __inline void c2p_3(void *chunky, void *bitplanes, int chunkyx, int chunkyy, struct Soff *soff, int bitplanesize, int depth)
  222. {
  223.  extern struct Library *ChunkyPPCBase;
  224.  c2p_3(ChunkyPPCBase,chunky,bitplanes,chunkyx,chunkyy,soff,bitplanesize,depth);
  225. }
  226.  
  227. __inline void c2p_4(UBYTE *chunky, UBYTE *Planar, UBYTE *temp, struct Soff *size, struct Soff *off, struct Soff *screensize)
  228. {
  229.  extern struct Library *ChunkyPPCBase;
  230.  c2p_4(ChunkyPPCBase,chunky,Planar,temp,size,off,screensize);
  231. }
  232.  
  233. __inline void Chunk